<div ng-if="pagedata.op=='apply'" class="fui-page page-merch-register">
    <div class="fui-content">
		<div style="padding:0.5rem">
		<div ng-if="pagedata.applyinfo.status>0">
                        <div ng-if="pagedata.applyinfo.status==3" class="fui-alert fui-alert-danger">
                            <p>您的申请被驳回：</p>
                            <p>{{pagedata.applyinfo.remark}}</p>
                            <p>您也可以修改信息重新提交</p>
                        </div>
                        <div ng-if="pagedata.applyinfo.status==1" class="fui-alert fui-alert-warning">
                            <p>您已经提交了信息，请等待我们联系您!</p>
                        </div>
						<div ng-if="pagedata.applyinfo.status==2" class="fui-alert fui-alert-warning">
                            <p>您已经提交了信息，已审核通过!</p>
                        </div>
		</div>
		<div ng-if="!pagedata.applyinfo.status || pagedata.applyinfo.status!=1 || true">
			<div class="fui-cell-group">
				<div class="fui-cell must ">
					<div class="fui-cell-label">门店名称</div>
					<div class="fui-cell-info"><input type="text" class="fui-input" id="title" placeholder="商户名称" ng-model="pagedata.applyinfo.title"/></div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-label">经营类型</div>
					<div class="fui-cell-info"><input type="text" class="fui-input" id="salecate" placeholder="例如鞋帽, 化妆品等" ng-model="pagedata.applyinfo.salecate"/></div>
				</div>
				 <div class="fui-cell must ">
					<div class="fui-cell-label">联系人</div>
					<div class="fui-cell-info"><input type="text" class="fui-input" id="name" placeholder="您的称呼" ng-model="pagedata.applyinfo.name"></div>
				</div>
				<div class="fui-cell">
				<div class="fui-cell-label">店铺地址</div>		
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.applyinfo.pcd.province" class="form-control tpl-province">
								<option value="" selected="selected">省份</option>
								<option ng-repeat="(value,data) in pagedata.province" value="{{value}}" ng-selected="pagedata.applyinfo.pcd.province==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.applyinfo.pcd.city" class="form-control tpl-city">
								<option value="" selected="selected">城市</option>
								<option ng-repeat="(value,data) in pagedata.province[pagedata.applyinfo.pcd.province]" value="{{value}}" ng-selected="pagedata.applyinfo.pcd.city==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.applyinfo.pcd.district" class="form-control tpl-district">
								<option value="" selected="selected">区县</option>
								<option ng-repeat="(value,data) in pagedata.province[pagedata.applyinfo.pcd.province][pagedata.applyinfo.pcd.city]" value="{{value}}" ng-selected="pagedata.applyinfo.pcd.district==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.applyinfo.pcd.street" class="form-control tpl-district">
								<option value="" selected="selected">街道</option>
								<option ng-repeat="value in pagedata.province[pagedata.applyinfo.pcd.province][pagedata.applyinfo.pcd.city][pagedata.applyinfo.pcd.district]" value="{{value}}" ng-selected="pagedata.applyinfo.pcd.street==value">{{value}}</option>
								</select>
							</div>
				
				</div>
				 <div class="fui-cell must ">
					<div class="fui-cell-label">详细地址</div>
					<div class="fui-cell-info"><input type="text" class="fui-input" id="address" placeholder="详细地址" ng-model="pagedata.applyinfo.address"></div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-label">销售码</div>
					<div class="fui-cell-info"><input type="text" class="fui-input" placeholder="请输入销售码，如果没有可以不填" ng-model="pagedata.applyinfo.salecode"></div>
				</div>
			</div>
			<div class="fui-list-group">
				<div class="fui-list">              
					<div class="fui-list-inner">
						<div class="title">门脸照</div>
					</div>
					<a class="fui-list-media">
						<img class="round" style="width: 3rem;height:3rem" src="{{tomedia(pagedata.applyinfo.image) || '../core/resource/images/nopic.jpg'}}" />
					</a>
					<a class="fui-list-media weui_uploader_input_wrp">
						<span class="weui_uploader_input" ng-click="image(pagedata.applyinfo,'image')" accept="image/jpg,image/jpeg,image/png,image/gif" multiple=""></span>
					</a>
				</div>
			</div>
			<div class='btn btn-danger block btn-submit' href="javascript:" ng-click="post(pagedata.applyinfo,'post')">申请</div>
		</div>
		</div>
    </div>
</div>
<script>
window.scope.location(function(re){
	var pcd = scope.pagedata.applyinfo.pcd
	if(!pcd || pcd ==''){
		scope.pagedata.applyinfo.pcd.province = re.addressComponents.province
		scope.pagedata.applyinfo.pcd.city = re.addressComponents.city
		scope.pagedata.applyinfo.pcd.district = re.addressComponents.district
		scope.$evalAsync();
	}
});
scope.pagedata.getprovince=function(){
	scope.get('core/member.set/getprovince/',function(res){
		scope.pagedata.province=res.province;
		scope.$evalAsync();
	});
}
scope.pagedata.getprovince();
</script>